package shop.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import shop.pojo.Supplier;

import java.util.List;

@Repository
public interface SysSupplierMapper {
    //获取总条数
    Integer getSupplierCount(@Param("querySupCode") String querySupCode, @Param("querySupName") String querySupName);

    //获取分页列表
    List<Supplier> getSupplierList(@Param("querySupCode")String querySupCode, @Param("querySupName") String querySupName,@Param("pageIndex") Integer pageIndex,@Param("pageSize") int pageSize);

    Supplier getSupplierDetail(Integer supId);

    int update(Supplier supplier);

    Integer supplierExistsById(@Param("supId") Integer supId);

    Integer deleteSupplierById(@Param("supId") Integer supId);

    Integer add(Supplier supplier);

    List<Supplier> getSupnameAndId();
}
